package com.weyoung.app.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.weyoung.app.pojo.dto.resp.EmergencyContactRespDTO;
import com.weyoung.app.pojo.entity.EmergencyContacts;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 紧急联系人 Mapper 接口
 */
@Mapper
public interface EmergencyContactsMapper extends BaseMapper<EmergencyContacts> {

    @Select("SELECT contact_id as id, contact_name as name, contact_phone as phone FROM emergency_contacts WHERE openid = #{openID}")
    List<EmergencyContactRespDTO> getList(String openID);
}